import { request } from '@/apis';
import { addPrefix } from '@/utils/helper';
import { type HbSubjectParam, SubjectType } from './types';
const prefixUrl = '/ep-query';

const Api = {
  screenArea: '/screen/area',
  screenIndustry: '/screen/industry',
  tagType: '/screen/tagType',
  tagYear: '/screen/tagYear',
  getHbSubject: '/v2/hbSubject/getHbSubject'
};


addPrefix(Api, prefixUrl);

/** 地区 */
export const getArea = () => request.get({ url: Api.screenArea });

/** 行业参数 */
export const getIndustry = () => request.get({ url: Api.screenIndustry });

/** 企业类型 */
export const getTagType = (params: SubjectType) => request.get({ url: Api.tagType, params: { type: params } });

/** 环保专题类 年份筛选 */
export const getTagYear = (type: string) => request.get({ url: Api.tagYear, params: { hbSubjectType: type } });

/** 环保专题 */
export const getHbSubject = (params: HbSubjectParam) => request.get({ url: Api.getHbSubject, params });
